package com.example.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class Borrow {
    @TableId(type = IdType.AUTO)
    private Long id;
    @TableField(value = "bookId")
    private Long bookId;
    @TableField(value = "bookName")
    private String bookName;
    @TableField(value = "userId")
    private Long userId;
    @TableField(value = "timeStart")
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //    返回该前端的日期的格式
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date timeStart;
    @TableField(value = "timeEnd")
//    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //    返回该前端的日期的格式
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date timeEnd;
    @TableField(value = "timeLength")
    private Integer timeLength;
    private Integer status;
}
